<?php
namespace app\members\controller;
use think\Controller;
use think\Request;
use think\Db;
use think\Session;
use app\index\common;
use app\index\controller\Log\InsertLog as IL;
// use app\common\Option;
class Utilities extends Controller
{
    public function __construct() {
        parent::_initialize();
       
      }
    /**
     * 刘家腾
     * 2018-5-22
     * 获取类目
     */
    public function get_businesscategory($type=0)
    {
        $data['code']=666;
        $data['msg']="操作成功！";
        $user_info=Session::get("user");
        $post_type=input('post.type');
        
        $type=isset($post_type)?$post_type:1;
        $data['data']=Db::table('systematics')
            ->where(["system_id"=>$user_info['system_id']])
            ->where(["type"=>$type])
            ->order('id desc')
            ->select();
        return $data;
    }
}